Skip to content

chore(10778): add legacy support for footer updates and trigger effects on footer click#10886

Open
rafaeltonholo wants to merge 20 commits intothunderbird:mainfrom
rafaeltonholo:feat/10778/wire-footer-button
Open

chore(10778): add legacy support for footer updates and trigger effects on footer click#10886
rafaeltonholo wants to merge 20 commits intothunderbird:mainfrom
rafaeltonholo:feat/10778/wire-footer-button

Conversation

@rafaeltonholo
Copy link
Copy Markdown
Member

Resolves #10778
Depends on #10863
feature-flag: enable_message_list_new_state

Commits on this PR

Summary

  • Add BaseStateMachineViewModel.onEventWithoutStateModification for events that could trigger a ui side effect without changing the state
  • Increase the MessageList's bottom padding
  • Wire the legacy footer button logic with the new Message List screen

Screen Recording

Screen.Recording.2026-04-16.at.3.04.19.PM.mp4

Update `SortCriteriaMenuList` to use the current account ID when dispatching sort criteria changes, ensuring settings are applied per-account rather than globally. This also adds a check to exclude `UnifiedAccountId` when determining the account ID.
Implemented message focus tracking and updated `MessageListFragment` to use the focused message for keyboard/contextual actions.

- Added `focusedMessage` to `MessageListMetadata` and corresponding focus events to `MessageItemEvent`.
- Updated `MessageListScreenRenderer` to dispatch focus enter/exit events.
- Refactored `MessageListFragment` to use `focusedMessage` for delete, archive, move, copy, and flag toggle operations.
- Implemented `toggleMessageSelect` logic using the view model state.
- Added `OpenMessage` effect to `MessageListEffect`.
- Created `OpenMessageSideEffect` to handle message click events and dispatch the open message effect.
- Updated `SetupLoadedMessagesState` to set active message on message click.
- Integrated `OpenMessageSideEffect` in `MessageListSideEffectsModule`.
- Updated `MessageListFragment` to handle `OpenMessage` effect and open the message.
… mode

- Added `ToggleMessageSideEffect` to handle message click events in selecting mode and dispatch toggle select event.
- Updated `SetupSelectingMessagesState` to toggle message selection state on click.
- Integrated `ToggleMessageSideEffect` in `MessageListSideEffectsModule`.
…age updates

- Created `SetMessageActiveSideEffect` to handle `SetMessageActive` events and scroll to the newly active message
- Updated `SetupLoadedMessagesState` to mark messages as active/inactive in the message list on click and active state changes
- Added `mapMessages()` utility to `MessageListState` for transforming message lists while preserving state type
- Fixed message scrolling comparison to use message IDs instead of object equality
- Replaced `LifecycleStartEffect` with `collectAsStateWithLifecycle` for scroll event collection
- Integrated `SetMessageActiveSideEffect` in `MessageListSideEffectsModule`
- Changed visibility of `MessageListScreenAccessibilityState` and `rememberMessageListScreenAccessibilityState` to internal
- Changed visibility of side effect classes to internal: `SetMessageActiveSideEffect`, `LoadPreferencesSideEffect`, `ToggleMessageSideEffect`, `ChangeSortCriteriaSideEffect`, `AllConfigurationsReadySideEffect`, `OpenMessageSideEffect`, `LoadSwipeActionsStateSideEffectHandler`, `LoadSortCriteriaStateSideEffectHandler`, `LoadFolderInformationSideEffect`
- Changed visibility of `DefaultLocalDeleteOperationDecider` and `MessageListViewModel` to internal
@rafaeltonholo rafaeltonholo requested a review from a team as a code owner April 16, 2026 18:11
@rafaeltonholo rafaeltonholo added report: exclude Exclude changes from user-facing reports (internal, minor, or not relevant to users). feature-flag Changes guarded by a feature flag. Please add a comment stating the name: "feature-flag: abc" pr: stacked Must be used on a PR that is stacked on top of other(s) labels Apr 16, 2026
@github-actions github-actions Bot added the tb-team Tasks and features handled by project maintainers label Apr 16, 2026
@rafaeltonholo rafaeltonholo requested review from dani-zilla and removed request for jbott-tbird April 16, 2026 18:11
@dani-zilla
Copy link
Copy Markdown
Contributor

dani-zilla commented Apr 29, 2026

Had a crash happen in my testing when adding a Thundermail account manually through Settings -> Add Account.

FATAL EXCEPTION: main
     Process: net.thunderbird.android.debug, PID: 7002
     java.lang.IllegalStateException: Account not found: /////account data manually removed here, but was a hashed value//////// 
    at com.fsck.k9.controller.MessagingControllerWrapper.getAccountDtoOrThrow(MessagingControllerWrapper.kt:22)
    at com.fsck.k9.controller.MessagingControllerWrapper.checkAuthenticationProblem(MessagingControllerWrapper.kt:209)
    at com.fsck.k9.ui.messagelist.LegacyMessageListFragment.setMessageList(LegacyMessageListFragment.kt:2022)
    at com.fsck.k9.ui.messagelist.LegacyMessageListFragment.onCreate$lambda$0(LegacyMessageListFragment.kt:316)

After the crash, upon re-opening the app I could see the account in my list of accounts. This was consistent, happening twice in my testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature-flag Changes guarded by a feature flag. Please add a comment stating the name: "feature-flag: abc" pr: stacked Must be used on a PR that is stacked on top of other(s) report: exclude Exclude changes from user-facing reports (internal, minor, or not relevant to users). tb-team Tasks and features handled by project maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ML 0.1/UI.04.5] - Wire footer button (lazy load) to legacy action

3 participants